home *** CD-ROM | disk | FTP | other *** search
/ Super PC 33 / Super PC 33 (Shareware).iso / spc / sonido / timidity / source / controls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-03  |  2.5 KB  |  84 lines

  1. /*
  2.  
  3.     TiMidity -- Experimental MIDI to WAVE converter
  4.     Copyright (C) 1995 Tuukka Toivonen <titoivon@snakemail.hut.fi>
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.     controls.h
  21. */
  22.  
  23. /* Return values for ControlMode.read */
  24.  
  25. #define RC_NONE 0
  26. #define RC_QUIT 1
  27. #define RC_NEXT 2
  28. #define RC_PREVIOUS 3 /* Restart this song at beginning, or the previous
  29.              song if we're less than a second into this one. */
  30. #define RC_FORWARD 4
  31. #define RC_BACK 5
  32. #define RC_JUMP 6
  33. #define RC_TOGGLE_PAUSE 7 /* Pause/continue */
  34. #define RC_RESTART 8 /* Restart song at beginning */
  35.  
  36. #define RC_PAUSE 9 /* Really pause playing */
  37. #define RC_CONTINUE 10 /* Continue if paused */
  38. #define RC_REALLY_PREVIOUS 11 /* Really go to the previous song */
  39. #define RC_CHANGE_VOLUME 12
  40.  
  41. #define CMSG_INFO    0
  42. #define CMSG_WARNING    1
  43. #define CMSG_ERROR    2
  44. #define CMSG_FATAL    3
  45. #define CMSG_TRACE    4
  46. #define CMSG_TIME    5
  47. #define CMSG_TOTAL    6
  48. #define CMSG_FILE    7
  49. #define CMSG_TEXT    8
  50.  
  51. #define VERB_NORMAL    0
  52. #define VERB_VERBOSE    1
  53. #define VERB_NOISY    2
  54. #define VERB_DEBUG    3
  55. #define VERB_DEBUG_SILLY    4
  56.  
  57. typedef struct {
  58.   char *id_name, id_character;
  59.   int verbosity, trace_playing, opened;
  60.  
  61.   int (*open)(int using_stdin, int using_stdout);
  62.   void (*close)(void);
  63.   int (*read)(int32 *valp);
  64.   int (*cmsg)(int type, int verbosity_level, char *fmt, ...);
  65.  
  66.   void (*refresh)(void);
  67.   void (*reset)(void);
  68.   void (*file_name)(char *name);
  69.   void (*total_time)(int tt);
  70.   void (*current_time)(int ct);
  71.  
  72.   void (*note)(int v);
  73.   void (*master_volume)(int mv);
  74.   void (*program)(int channel, int val); /* val<0 means drum set -val */
  75.   void (*volume)(int channel, int val);
  76.   void (*expression)(int channel, int val);
  77.   void (*panning)(int channel, int val);
  78.   void (*sustain)(int channel, int val);
  79.   void (*pitch_bend)(int channel, int val);
  80.   
  81. } ControlMode;
  82.  
  83. extern ControlMode *ctl_list[], *ctl; 
  84.